import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Destinations from '../views/Destinations.vue'
import TourDetail from '../views/TourDetail.vue'
import About from '../views/About.vue'
import Contact from '../views/Contact.vue'

Vue.use(VueRouter)

const routes = [
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/destinations',
name: 'Destinations',
component: Destinations
},
{
path: '/tour/:id',
name: 'TourDetail',
component: TourDetail,
props: true
},
{
path: '/about',
name: 'About',
component: About
},
{
path: '/contact',
name: 'Contact',
component: Contact
}
]

const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes
})

export default router